home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / AESample.sit / AESample / About AESample next >
Text File  |  1996-06-22  |  7KB  |  126 lines

  1. About This Sample
  2.  
  3. Revision: 0.1.1
  4. Date: June 22, 1996
  5. Author: Fumio Rokkaku
  6.     rokkaku@roland.co.jp
  7.     rokkaku@inetc.roland.co.jp
  8.     PXL01437@niftyserve.or.jp
  9.     <http://www.inetc.roland.co.jp/~rokkaku/>
  10.  
  11.  
  12. 1. About this package: メAE Sampleモ
  13.  
  14. I wrote this program to learn how to implement AppleEvents.
  15. I wrote minimal AppleEvent receiving handlers (Required AppleEvents) and several AppleEvent sending procedures. 
  16. I hope this sample may help novice programmers who have felt AppleEvent is complicated.
  17.  
  18. This package includes three project files:
  19.  
  20. TC.sample.prj:
  21.     THINK C 8.0 (THINK Project Manager 7.0.4) project
  22. CW.sample.68K.prj:
  23.     CodeWarrior IDE project for 68K
  24. CW.sample.PPC.prj:
  25.     CodeWarrior IDE for PPC
  26.  
  27. I wrote the sources using CodeWarrior. I also confirmed they can be compiled with THINK C.
  28. However, easier version than the 8.4 of Symantec C/C++ contains old-fashioned Universal Headers. If you use such versions, you will meet a lot of compile errors. Please use the Symantec C/C++ version 8.4 or greater.
  29.  
  30. The application: メAESampleモ simply receives dragged and dropped files via AppleEvents and send some of AppleEvents to Finder or some application to open the files.
  31. Its functions are not useful at all but I think it a good sample to learn how to work with AppleEvents.
  32.  
  33. It also has a function to send AppleEvents to designated Application using PPCBrowser. I hope it to be useful when debugging your AppleEvent receiving handlers.
  34.  
  35. 2. To AppleEvent novices
  36.  
  37. メsample.AE.cモ includes the minimal AppleEvent receiving handlers.
  38. メsample.send.cモ includes AppleEvent sending samples.
  39. If you just want to implement Drag and Drop receiver from Finder, you can just quote メsample.AE.cモ into your application.
  40. If you want to send your AppleEvent, refer to メsample.send.c.モ
  41.  
  42. Be sure to check the Size Flag of your project when you make your own project file. The flag is absolutely needed when the application sends or receives AppleEvents.
  43. If you use THINK C, you can set it using メSet Project Type...モ menu. If you use CodeWarrior, you can set it using メProjectモ item of メPreferences...モ menu.
  44.  
  45.  
  46. 3. New features added in the version 0.1
  47.  
  48. 3.1. Macintosh Drag and Drop
  49. The version 0.1 newly includes file receiving procedures from Finder using Drag Manager (Macintosh Drag and Drop). Drag Manager itself is independent from AppleEvent implementation but I added it as an example of the High Level Event.
  50.  
  51. Here I describe some of peculiarities of Drag Manager. Drag Manager handlers allow global variable freely although they are callback. On the other hand, they offer strict limitation that they never allow process switching. This is a big problem for programmers because we cannot use source level debuggers. However we want to trace some trouble, Drag Manager never passes the process to the debugger and we will meet a lockup. So, we have to write source code very carefully.
  52.  
  53. In addition, Drag Manager handlers restrict inter-application communications. Since they never pass the process to the target applications, we cannot use any AppleEvents that expect reply events.
  54.  
  55. AESample 0.1 does not process the received files directly in the Drag Manager handler but sends the files to AESample itself using OpenDocument AppleEvents. By processing the files outside the Drag Manager handler, AESample 0.1 avoids potential inter-application problems.
  56.  
  57. AESample receives files by dragging and dropping files onto the メOpenモ menu button. Note that the hiliting procedure of AESample does not follow the standard Drag Manager procedures.
  58.  
  59. 3.2. Notification Manager
  60. Implementing Macintosh Drag and Drop, I also had to change alert methods. Macintosh Drag and Drop allows to approach background applications and transact data. In case an application is in background, some error has occurred and shows an alert immediately, the alert would not be a front-most window and the user may not recognize what has gone wrong. Otherwise, you might think to force the application to be foreground but it would violate the human interface guideline. Therefore I implemented the Notification Manager according to the guideline.
  61.  
  62. 3.3. EmbossDraw Library
  63. AESample 0.1 includes several routines named EmbossDraw Library. They provide 3D-like lines and rectangle drawing procedures. AESample 0.1 uses them for drawing such as menu buttons of the main window.
  64.  
  65. Recent applications equip colorful user interface elements that are not provided by the standard MacOS API. I am interested in such elements and wrote several drawing routines. These are totally dependent items from AppleEvent implementation but I decided to include them expecting they would  help you. Though I do not write any details of their usage, I think you will easily understand how to use them by reading the EmbossDraw.h
  66.  
  67.  
  68. 4. Terms of distribution and usage
  69.  
  70. Keep whole files including this document when you distribute this package.
  71. Except it, I donユt lay any claims to this package. You can distribute it freely without the permission. You can change the archiving or compacting method as you like.
  72. You can also use every code of the sources. You donユt need to ask for my permission nor authorization. You can use it not only for non-commercial but also commercial purposes.
  73.  
  74.  
  75. 5. Disclaimer
  76.  
  77. I am not responsible to any problems caused with the source codes of this package.
  78. You should use it at your own risk.
  79.  
  80.  
  81. 6. Other notices
  82.  
  83. 6.1. Scope
  84. Scopes of functions and variables are set just for conveniences of AESample. You can modify them when you fit them in your sources.
  85.  
  86. 6.2. BNDL setting
  87. Sometimes, a few people wonder their programs don't accept Finder drag and drop though they implemented AppleEvent Handlers.
  88. In that case, please check the followings:
  89.     whether if the 'BNDL' has been set needed file types.
  90.     Otherwise, whether if the 'BNDL' contains wild-card type: '****'.
  91. If you have done so and it doesn't work yet, please try to rebuild the desktop.
  92.  
  93.  
  94. 7. Special thanks
  95.  
  96. The following persons helped me with their suggestions and source codes when I wrote this package: メAE Sample.モ I would like to express my thanking to them.
  97.  
  98. Takahiro Sumiya, sumi@cuby.mis.hiroshima-u.ac.jp
  99.     from: メFolder to ShowPagesモ
  100.  
  101. Tetsuya Mizutori, Mizutori@ai.rcast.u-tokyo.ac.jp, GED00276@niftyserve.or.jp
  102.     from: メpuriTEXT 1.1モ
  103.  
  104. Takuho Momma, VFD03522@niftyserve.or.jp
  105.     from: メManaita v2モ
  106.  
  107. Hirotake Yamamori (GBH05214@niftyserve.or.jp) checked the AESample runs under PPC environments.
  108. Fumiyuki Mikami (f_mik@yk.rim.or.jp, PXH04442@niftyserve.or.jp) helped fix the MakeMyDocDescList memory leaking bug.
  109. I also say my thanks to them.
  110.  
  111.  
  112. 8. Revisions:
  113. 0.1.1:    Added more Drag Manager handlers
  114. 0.1.0:    Added Drag Manager handlers
  115. 0.0.9:    (not released)
  116. 0.0.8:    fixed compile errors using THINK C 
  117. 0.0.6:    fixed bugs in SendMyAppleEvent() and FindAppFromItsSig()
  118. 0.0.7:    fixed a bug in MakeMyDocDescList()
  119.  
  120.  
  121. 9. Copyright Notice
  122.  
  123. Copyright ゥ1994-1996 Fumio Rokkaku
  124. All Rights Reserved.
  125. However, you can use it and distribute it freely as far as you use it at your own risk.
  126.